import request from '@/utils/request'


// 查询所有区域列表
export function listRegion(query) {
  return request({
    url: '/region/region/select', 
    method: 'get',
    params: query
  })
}

// 根据ID查询区域详情
export function getRegion(id) {
  return request({
    url: '/region/region/' + id, 
    method: 'get'
  })
}

// 新增区域
export function addRegion(data) {
  return request({

    url: '/region/region/add',  

    method: 'post',
    data: data
  })
}

// 修改区域
export function updateRegion(data) {
  return request({
    url: '/region/region/' + data.id,  
    method: 'put',
    data: data
  })
}



// 删除区域
export function delRegion(id) {
  return request({
    url: '/region/region/' + id,  
    method: 'delete'
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}
    